/*
Copyright 2022 The Numaproj Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by Openapi Generator. DO NOT EDIT.

/// UpdateStrategy : UpdateStrategy indicates the strategy that the controller will use to perform updates for Vertex or MonoVertex.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateStrategy {
    #[serde(rename = "rollingUpdate", skip_serializing_if = "Option::is_none")]
    pub rolling_update: Option<Box<crate::models::RollingUpdateStrategy>>,
    /// Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.  Possible enum values:  - `\"RollingUpdate\"`
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
}

impl UpdateStrategy {
    /// UpdateStrategy indicates the strategy that the controller will use to perform updates for Vertex or MonoVertex.
    pub fn new() -> UpdateStrategy {
        UpdateStrategy {
            rolling_update: None,
            r#type: None,
        }
    }
}

/// Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.  Possible enum values:  - `\"RollingUpdate\"`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "RollingUpdate")]
    RollingUpdate,
}

impl Default for Type {
    fn default() -> Type {
        Self::RollingUpdate
    }
}
